﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ApplicantSite.Master" AutoEventWireup="true"
    CodeBehind="ApplicationForm.aspx.cs" Inherits="SRM.ApplicationForm" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="ContentMainBody" ContentPlaceHolderID="MainBody" runat="server">
    <div class="navigation">
        <telerik:RadTabStrip ID="NavigationRadTabStrip" runat="server" MultiPageID="MultiPageForm">
            <Tabs>
                <telerik:RadTab runat="server" Selected="True" Text="Personal Particulars">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Family Particulars">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Education Qualication">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Language Proficiency">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Professional Membership">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Awards">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Employment History">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Further Information">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Resume File">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
    </div>
    <div>
        <telerik:RadMultiPage ID="MultiPageForm" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="PersonalParticularsPageView" runat="server">
                <div>
                Personal Particulars
                </div>
            </telerik:RadPageView>
            <telerik:RadPageView ID="FamilyParticularsPageView" runat="server">
                <div>
                    <h2>Family Particulars</h2>

                    <telerik:RadGrid ID="FamilyParticularsRadGrid" runat="server" AutoGenerateColumns="False" 
                        GridLines="None" oneditcommand="FamilyParticularsRadGrid_EditCommand">
                        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                        </ClientSettings>
                        <MasterTableView CommandItemDisplay="Top">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <NoRecordsTemplate>
                                No records.
                            </NoRecordsTemplate>
                            
                            <Columns>
                                <telerik:GridBoundColumn HeaderText="Name" UniqueName="NameColumn" DataField="MemberName" />
                                <telerik:GridTemplateColumn HeaderText="Relationship" 
                                    UniqueName="RelationshipColumn">
                                    <ItemTemplate>
                                        <%# Eval("Relationship")%>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <%# Eval("Relationship")%>
                                        <asp:DropDownList   ID="RelationshipDropDownList" runat="server" 
                                                            AppendDataBoundItems="True" 
                                                            DataTextField="Description" 
                                                            DataValueField="CodeName" 
                                                            SelectedValue='<%# Bind("Relationship") %>'>
                                            <asp:ListItem Selected="True" Text="--Please Select---" Value=""></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn HeaderText="Date of Birth" UniqueName="DateOfBirthColumn" DataField="BirthDate" />
                                <telerik:GridBoundColumn HeaderText="Nationality" UniqueName="NationalityColumn" DataField="Nationality" />
                                <telerik:GridBoundColumn HeaderText="Occupation" UniqueName="OccupationColumn" DataField="Occupation" />
                                <telerik:GridBoundColumn HeaderText="Employer" UniqueName="EmployerColumn" DataField="FamilyEmployer" />
                                <telerik:GridTemplateColumn DataField="EmergencyContact" 
                                    HeaderText="Emergency Contact" UniqueName="EmergencyContactColumn">
                                    <EditItemTemplate>
                                        <asp:DropDownList runat="server" ID="EmergencyContactDropDownList" AppendDataBoundItems="true" SelectedValue='<%# Bind("EmergencyContact") %>'>
                                            <asp:ListItem Selected="True" Text="--Please Select---" Value=""></asp:ListItem>
                                            <asp:ListItem Text="YES" Value="YES"></asp:ListItem>
                                            <asp:ListItem Text="NO" Value="NO"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="EmergencyContactLabel" runat="server" 
                                            Text='<%# Eval("EmergencyContact") %>'></asp:Label>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn HeaderText="Contact No" UniqueName="ContactNoColumn" DataField="ContactNo" />
                                <telerik:GridButtonColumn HeaderText="Edit" UniqueName="EditColumn" ButtonType="ImageButton" CommandName="Edit">
                                    <HeaderStyle Width="30px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridButtonColumn>
                                <telerik:GridButtonColumn HeaderText="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" CommandName="Delete">
                                    <HeaderStyle Width="30px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridButtonColumn>
                            </Columns>
                            <CommandItemTemplate>
                                <div style="height:2.2em;">
                                    <asp:ImageButton ID="ImageButton1" ImageUrl="Images/Grid/AddRecord.gif" runat="server" CommandName="Add" ImageAlign="Middle" /> 
                                    <asp:LinkButton Text="Add New Record" runat="server" CommandName="Add" CssClass="valign-bottom aaa" />
                                </div>
                            </CommandItemTemplate>
                        </MasterTableView>
                    </telerik:RadGrid>
                    <p>
                    </p>





                </div>
            </telerik:RadPageView>
            <telerik:RadPageView ID="EducationQualicationPageView" runat="server">
                Education Qualication
            </telerik:RadPageView>
            <telerik:RadPageView ID="LanguageProficiencyPageView" runat="server">
                <div class="container">
                Language Proficiency
                    <telerik:RadGrid ID="LanguageProficiencyRadGrid" runat="server" AutoGenerateColumns="False" 
                        GridLines="None">
                    </telerik:RadGrid>
                </div>
                
            </telerik:RadPageView>
            <telerik:RadPageView ID="ProfessionalMembershipPageView" runat="server">
                Professional Membership
            </telerik:RadPageView>
            <telerik:RadPageView ID="AwardsPageView1" runat="server">
                Awards
            </telerik:RadPageView>
            <telerik:RadPageView ID="EmploymentHistoryPageView" runat="server">
                Employment History
            </telerik:RadPageView>
            <telerik:RadPageView ID="FurtherInformationPageView" runat="server">
                Further Information
            </telerik:RadPageView>
            <telerik:RadPageView ID="ResumeFilePageView" runat="server">
                Resume File
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    </div>

    <hr />

    <p>
        <asp:Button Text="Submit Application" ID="ButtonSubmitApplication" runat="server" />
    </p>
</asp:Content>
